package com.hzp.micromall.order.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hzp.micromall.order.dao.OmsOrderSettingDao;
import com.hzp.micromall.order.entity.OmsOrderSetting;
import com.hzp.micromall.order.service.OmsOrderSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author houzipeng
 * @Date 2022/2/28 23:06
 * @Version 1.0
 */
@Service
public class OmsOrderSettingServiceImpl extends ServiceImpl<OmsOrderSettingDao, OmsOrderSetting> implements OmsOrderSettingService {
    @Autowired
    private OmsOrderSettingDao orderSettingDao;

    @Override
    public OmsOrderSetting getSetting() {
        return orderSettingDao.selectOne(null);
    }

    @Override
    public int update(Long id, OmsOrderSetting orderSetting) {
        orderSetting.setId(id);
        return orderSettingDao.updateById(orderSetting);
    }
}
